package io.itit.ecp.admin.provide.action.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.itit.grass.common.provide.action.validation.IAdd;
import io.itit.grass.common.provide.action.validation.IBatch;
import io.itit.grass.common.provide.action.validation.IUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * @Author：Roy
 * @Description：碳排放因子参数
 * @Date：Create by 2023-11-23 16:28:52
 */
@Data
@ToString
@ApiModel("碳排放因子参数")
public class CarbonEmissionFactorReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @Null(groups = IAdd.class)
    @NotBlank(groups = IUpdate.class)
    @ApiModelProperty("主键")
    private String id;

    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    @NotNull(groups = {IUpdate.class, IAdd.class})
    @ApiModelProperty("数据日期")
    private Date solidifyDate;

    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    @NotNull(groups = {IBatch.class})
    @ApiModelProperty("开始日期")
    private Date solidifyDateStart;

    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    @NotNull(groups = {IBatch.class})
    @ApiModelProperty("结束日期")
    private Date solidifyDateEnd;

    @NotNull(groups = {IUpdate.class, IAdd.class, IBatch.class})
    @ApiModelProperty("能源类型Id")
    private String energyTypeId;

    @NotNull(groups = {IUpdate.class, IAdd.class, IBatch.class})
    @ApiModelProperty("因子")
    private BigDecimal factor;

    @ApiModelProperty("单位")
    private String unit;

    @ApiModelProperty("备注")
    private String remark;

}
